#ifndef MCIDISC_H
#define MCIDISC_H

#ifdef __WXMSW__

#include "../Disc.h"

class CMciDisc : public CDisc
{
public:
	CMciDisc ( const wxString &rDevice = "cdaudio" );
	virtual ~CMciDisc();

	wxUint32 GetTrackCount() const;
	unsigned long GetStartFrame ( wxUint32 track ) const;
	unsigned long GetFrames ( wxUint32 track ) const;

	class Track
	{
	public:
		Track ( unsigned long startFrame, unsigned long frames,
			const wxString &rLength ) : mStartFrame ( startFrame ), 
			mFrames ( frames ), mLength ( rLength )
		{ 
		}
		unsigned long GetStartFrame() const { return mStartFrame; }
		unsigned long GetFrames() const { return mFrames; }
		const wxString &GetLength() const { return mLength; }
	private:
		wxString mLength;
		unsigned long mStartFrame, mFrames;
	};

	const std::deque < Track > &GetTracks() { return mTracks; }
private:
	void ReadTrackCount();
	void CreateTracks();
	const wxString SendString ( const wxString &rCommand ) const;	

	wxUint32 mTrackCount;
	std::deque < Track > mTracks;
	wxString mDevice;
};

typedef CMciDisc COSDisc;

#endif	// __WXMSW__

#endif // MCIDISC_H
